package com.ktgj.customer.service;

import java.util.Date;
import java.util.List;

import com.ktgj.customer.domain.*;
import com.ktgj.customer.domain.dto.CustomerCRMDataDTO;
import com.ktgj.customer.domain.vo.*;

/**
 * 会员基本信息Service接口
 * 
 * @author ruoyi
 * @date 2021-07-30
 */
public interface ICustomerService
{
    /**
     * 查询会员基本信息
     * 
     * @param customerId 会员基本信息ID
     * @return 会员基本信息
     */
    public Customer selectCustomerById(Long customerId);

    public List<CustomerRightdetail> getCustomerRightCoupon(Long customerId);

    /**
     * 查询会员基本信息列表
     * 
     * @param customer 会员基本信息
     * @return 会员基本信息集合
     */
    public List<Customer> selectCustomerList(Customer customer);

    /**
     * 退卡申请
     * @param phone
     * @return
     */
    public List<CustomerReturnCard> selectCustomerReturnCardByPhone(String phone) ;

    /**
     * 退卡申请
     * @param phone
     * @return
     */
    public List<CustomerReturnCard> tmpSelectCustomerReturnCardByPhone(String phone) ;
    /**
     * 退卡审核
     * @param cardCode
     * @return
     */
    public CustomerReturnCard selectCustomerReturnCardBycardCode(String cardCode);

    /**
     * 新增会员基本信息
     * 
     * @param customer 会员基本信息
     * @return 结果
     */
    public int insertCustomer(Customer customer);

    /**
     * 修改会员基本信息
     * 
     * @param customer 会员基本信息
     * @return 结果
     */
    public CustomerDto updateCustomerByCustomer(Customer customer, String token);

    /**
     * 修改会员基本信息
     *
     * @param customer 会员基本信息
     * @return 结果
     */
    public Customer updateCustomer(Customer customer, String token);

    /**
     * 修改会员基本信息
     *
     * @param customer 会员基本信息
     * @return 结果
     */
    public int update(Customer customer);

    /**
     * 查询当前会员信息
     * */
    public MemberInformationVo selectMemberInformation(Long customerId);

    /**
     * 批量删除会员基本信息
     * 
     * @param customerIds 需要删除的会员基本信息ID
     * @return 结果
     */
    public int deleteCustomerByIds(Long[] customerIds);

    /**
     * 删除会员基本信息信息
     * 
     * @param customerId 会员基本信息ID
     * @return 结果
     */
    public int deleteCustomerById(Long customerId);

    /**
     * 会员基本信息与常用地址对象关联查询（一对多）
     * @param customerId
     * @return
     */
    public List<Customer> selectCustomerAndCommonAddressesList(Long customerId);

    /**
     * 会员基本信息与常用报销凭证信息对象关联查询（一对多）
     * @param customerId
     * @return
     */
    public List<Customer> selectCustomerAndCommonReimbursementsList(Long customerId);

    /**
     * 会员基本信息与常用旅客信息对象关联查询（一对多）
     * @param customerId
     * @return
     */
    public List<Customer> selectCustomerAndCommonTravelersList(Long customerId);

    /**
     * 会员基本信息与银行卡信息对象关联查询（一对多）
     * @param customerId
     * @return
     */
    public List<Customer> selectCustomerAndBankCardList(Long customerId);

    /**
     * 我的-编辑个人信息
     * @param customer
     * @return
     */
    public Customer updateCustomerLogin(Customer customer);

    /**
     * 我的-添加证件
     * @param
     * @return
     */
    public int updateCustomerByCertificate(Long customerId, String idType, String custCertificateNo, String invalidDate);

    /**
     * 我的-积分
     * @return
     */
    public IntegralVo selectPointRecordByCustomerId(Long customerId);

    /**
     * 我的-信息
     * */
    public CurrentMemberVo selectCustomerByCustomerId(Long customerId);

    /**
     * 证件类型显示
     * */
    public List<CertificateVo> showCertificate();

    /**
     * 我的-积分明细
     * */
    public PointRecordIntegraVo selectCustomerDetail(Long customerId, Date date);

    /**
     * 修改密码
     * */
    public int updateCustomerByCustLoginPswmd5(Long customerId, String NewCustLoginPswmd5One,
                                               String NewCustLoginPswmd5Two, String CustLoginPswmd5);

    /**
     * 积分到期提示列表
     * */
    public List<WillExpireSoonVo> willExpireSoonIntegral(Long customerId);

    Customer getCustomerByMobileId(String mobileId);

    String getCustomerCardDisplay(Long customerId);

    long getCustomerCardExpireDays(Long customerId);

    Customer selectCustomerByContractPhoneOnes(String phone);

    /**
     * 登机牌会员价格汇总
     * */
    public List<SummaryVo> customerPriceSummary(Long customerId);

    Customer selectCustomerPhoneById(Long customerId);

    Customer customerPhoneLogin(String phone);

    /**
     * 查询会员信息
     * @param phone
     * @param idCode
     * @return
     */
    public CustomerCRM queryCustomer(String phone, String idCode, String cardNum) throws Exception;
    /**
     * 会员识别查询
     * @param customerIdentify
     * @return
     */
    public List <CustomerIdentify> selectCustomerIdentify(CustomerIdentify customerIdentify);

    /**
     * 查询会员卡
     * @param customerId
     * @return
     */
    public List<CustomerReturnCard> getCustomerCardByCustomerId(Long customerId);

    /**
     * 会员信息查id
     * */
    public Long customerByCustomerName(VipCustomerVo vipCustomerVo);

    /**
     * 查会员信息
     * @param phone
     * @param idCode
     * @return
     */
    public  Customer selectCustomerByPhone(String phone,String idCode);

    /**
     *
     * @param customerId
     * @param phone
     * @param certificateNo
     * @param cardCode
     * @return
     */

    public CustomerCRMDataDTO queryCRMCustomerData(Long customerId, String phone, String certificateNo, String cardCode, String customerName);

    public Customer InquireCustomerById(Long customerId);

    /**
     * 退卡审核
     * @param customerReturnCard
     * @return
     */
    public List<CustomerReturnCard> selectCustomerReturnCardByorderDate(CustomerReturnCard customerReturnCard) throws Exception;

    //获取各种类型的卡会员信息分组
    List<CustomerCardGroupVO> getCustomerCardGroupList();
    //生成会员二维码
    public String generateCustomerQrCode(String customerId);
    /**
     * 检索三个月内未读的会员消息
     */
    public List<CustomerMessage> selectCustomerMessage(CustomerMessage customerMessage);
    /**
     * 检索三个月所有的会员消息
     */
    public List<CustomerMessage> selectAllCustomerMessage(CustomerMessage customerMessage);
    /**
     * 新增会员消息
     */
    public int addCustomerMessage(CustomerMessage customerMessage);
    /**
     * 修改会员消息状态
     */
    public int updateCustomerMessage(CustomerMessage customerMessage);

    /**
     * 根据会员信息查id
     * */
    public CustomerIdVo customerId(CustomerIdVo customerIdVo) throws Exception;

    /**
     * 查询待修改的会员详细信息
     */
    public CustomerDetailed customerDetailed(Long id);

    /**
     * 修改的会员详细信息
     */
    public int updateCustomerDetailed(CustomerDetailed customerDetailed) throws Exception;

    /**
     * 会员 姓名/手机号查信息
     * */
    public Customer nameAndPhone(String name, String phone) throws Exception;

    //根据会员ID获取会员的VIP经理
    Employee getVipEmployee(Long customerId);
}
